﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

    /// <summary>
    /// 实体类TB_Exam_ExamRoom 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class TB_Exam_ExamRoom : Entity
    {
        public TB_Exam_ExamRoom()
            : base("TB_Exam_ExamRoom")
        {
        }

        #region Model
        private string _ExamRoomNO;
        private string _EntretenimientohID;
        private string _ExamRoomName;
        private string _IsActive;
        private string _ExamYear;
        /// <summary>
        /// 考场编码
        /// </summary>
        public string ExamRoomNO
        {
            get { return _ExamRoomNO; }
            set
            {
                this.OnPropertyValueChange(_.ExamRoomNO, _ExamRoomNO, value);
                this._ExamRoomNO = value;
            }
        }
        /// <summary>
        /// 考务ID
        /// </summary>
        public string EntretenimientohID
        {
            get { return _EntretenimientohID; }
            set
            {
                this.OnPropertyValueChange(_.EntretenimientohID, _EntretenimientohID, value);
                this._EntretenimientohID = value;
            }
        }
        /// <summary>
        /// 考场名称
        /// </summary>
        public string ExamRoomName
        {
            get { return _ExamRoomName; }
            set
            {
                this.OnPropertyValueChange(_.ExamRoomName, _ExamRoomName, value);
                this._ExamRoomName = value;
            }
        }
        /// <summary>
        /// 是否有效
        /// </summary>
        public string IsActive
        {
            get { return _IsActive; }
            set
            {
                this.OnPropertyValueChange(_.IsActive, _IsActive, value);
                this._IsActive = value;
            }
        }
        /// <summary>
        /// 考试年度
        /// </summary>
        public string ExamYear
        {
            get { return _ExamYear; }
            set
            {
                this.OnPropertyValueChange(_.ExamYear, _ExamYear, value);
                this._ExamYear = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.ExamRoomNO};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.ExamRoomNO,
				_.EntretenimientohID,
				_.ExamRoomName,
				_.IsActive,
				_.ExamYear};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._ExamRoomNO,
				this._EntretenimientohID,
				this._ExamRoomName,
				this._IsActive,
				this._ExamYear};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._ExamRoomNO = DataUtils.ConvertValue<string>(reader["ExamRoomNO"]);
            this._EntretenimientohID = DataUtils.ConvertValue<string>(reader["EntretenimientohID"]);
            this._ExamRoomName = DataUtils.ConvertValue<string>(reader["ExamRoomName"]);
            this._IsActive = DataUtils.ConvertValue<string>(reader["IsActive"]);
            this._ExamYear = DataUtils.ConvertValue<string>(reader["ExamYear"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._ExamRoomNO = DataUtils.ConvertValue<string>(row["ExamRoomNO"]);
            this._EntretenimientohID = DataUtils.ConvertValue<string>(row["EntretenimientohID"]);
            this._ExamRoomName = DataUtils.ConvertValue<string>(row["ExamRoomName"]);
            this._IsActive = DataUtils.ConvertValue<string>(row["IsActive"]);
            this._ExamYear = DataUtils.ConvertValue<string>(row["ExamYear"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Exam_ExamRoom");
            /// <summary>
            /// 考场编码
            /// </summary>
            public readonly static Field ExamRoomNO = new Field("ExamRoomNO", "TB_Exam_ExamRoom", "考场编码");
            /// <summary>
            /// 考务ID
            /// </summary>
            public readonly static Field EntretenimientohID = new Field("EntretenimientohID", "TB_Exam_ExamRoom", "考务ID");
            /// <summary>
            /// 考场名称
            /// </summary>
            public readonly static Field ExamRoomName = new Field("ExamRoomName", "TB_Exam_ExamRoom", "考场名称");
            /// <summary>
            /// 是否有效
            /// </summary>
            public readonly static Field IsActive = new Field("IsActive", "TB_Exam_ExamRoom", "是否有效");
            /// <summary>
            /// 考试年度
            /// </summary>
            public readonly static Field ExamYear = new Field("ExamYear", "TB_Exam_ExamRoom", "考试年度");
        }
        #endregion


    }
}

